/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.TrackableEntity;
import java.util.ArrayList;
import java.util.List;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.FetchGroups;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author AI-LAM
 */
@PersistenceCapable(detachable = "true", table = "SHOP_pawnInformation")
@FetchGroups(value = {
    @FetchGroup(name = "detach_PawnInformation_All", members = {
        @Persistent(name = "pawnRates"),
        @Persistent(name = "createdBy")}),
    @FetchGroup(name = "detach_PawnInformation_PawnRate", members = {
        @Persistent(name = "pawnRates")})
})
public class PawnInformation extends TrackableEntity {

    @Persistent
    private List<PawnRate> pawnRates;
    @Persistent
    private double pawnRatePerMonth;
    @Persistent
    private double pawnAverageRatePerDate;
    @Persistent
    private double pawnAmountException;
    @Persistent
    private double pawnDayException;
    @Persistent
    private double pawnRateException;
    @Persistent
    private double pawnAverageRatePerDateException;
    @Persistent
    private int pawnExpiredDate;
    @Persistent
    private int pawnLiquidationDate;
    @Persistent
    private double pawnMinimumRate;
    @Persistent
    private boolean use;

    public PawnInformation() {
        pawnRates = new ArrayList<PawnRate>();
        for (int i = 1; i < 31; i++) {
            pawnRates.add(new PawnRate(i));
        }
    }

    public List<PawnRate> getPawnRates() {
        return pawnRates;
    }

    public void setPawnRates(List<PawnRate> pawnRates) {
        this.pawnRates = pawnRates;
    }

    public double getPawnAmountException() {
        return pawnAmountException;
    }

    public void setPawnAmountException(double pawnAmountException) {
        this.pawnAmountException = pawnAmountException;
    }

    public double getPawnDayException() {
        return pawnDayException;
    }

    public void setPawnDayException(double pawnDayException) {
        this.pawnDayException = pawnDayException;
    }

    public double getPawnRateException() {
        return pawnRateException;
    }

    public void setPawnRateException(double pawnRateException) {
        this.pawnRateException = pawnRateException;
    }

    public int getPawnExpiredDate() {
        return pawnExpiredDate;
    }

    public void setPawnExpiredDate(int pawnExpiredDate) {
        this.pawnExpiredDate = pawnExpiredDate;
    }

    public int getPawnLiquidationDate() {
        return pawnLiquidationDate;
    }

    public void setPawnLiquidationDate(int pawnLiquidationDate) {
        this.pawnLiquidationDate = pawnLiquidationDate;
    }

    public double getPawnMinimumRate() {
        return pawnMinimumRate;
    }

    public void setPawnMinimumRate(double pawnMinimumRate) {
        this.pawnMinimumRate = pawnMinimumRate;
    }

    public double getPawnAverageRatePerDate() {
        return pawnAverageRatePerDate;
    }

    public double getPawnAverageRatePerDateException() {
        return pawnAverageRatePerDateException;
    }

    public double getPawnRatePerMonth() {
        return pawnRatePerMonth;
    }

    public void setPawnRatePerMonth(double pawnRatePerMonth) {
        this.pawnRatePerMonth = pawnRatePerMonth;
    }

    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        this.use = use;
    }
}
